<template>
    <div style="margin: 0 10px 0 10px">
        <div style="margin: 10px">
            用户名: <Input v-model="dataFilter.donatorUserName" size="small" placeholder="" style="width: 120px" />
            <Button type="primary" shape="circle" icon="ios-search" style="margin-left: 15px" @click="loadData"></Button>
        </div>
        <Table :data="tableData"  :columns="columns"    :loading="loading">

        </Table>
        <div style="margin: 25px;overflow: hidden">
            <div style="float: right;">
                <Page :total="total" :current="dataFilter.current" :page-size="dataFilter.size"
                      show-sizer
                      @on-change="changePage" @on-page-size-change="changeSize" :page-size-opts="[10,20,50,100]"></Page>
            </div>
        </div>
    </div>
</template>
<script>
    import Base from '@/components/table/BaseList';
    import user from '@/common/user';
    import dictUtils from '@/common/dictUtils';
    export default {
        components:{ },
        extends:Base,
        data () {
            return {
                columns: [
                    { type: 'index', width: 60, align: 'center'},
                    { title: '用户名', key: 'donatorUserName'},
                    { title: '捐赠数量', key: 'donatorCount', width: 100, align: 'center'}
                ]
            }
        },
        mounted(){
            this.dataFilter. helpUserId=user.getUser().id;
            this.loadData();
        },
        methods: {
            handleEdit(){
                //编辑功能
            },
            loadData(){
                //获取列表数据
                this.baseLoadData('/api/donate/listRank');
            }
        }
    }
</script>
